home *** CD-ROM | disk | FTP | other *** search
/ Macworld Expo - Develope…Central & Net Innovations / Developer Central and Net Innovators (MacWorld Expo) (January 1999).iso / Developer Central / Metrowerks CodeWarrior / CodeWarrior Pro 4 Release Notes / Java Notes / Class Wrangler ReadMe < prev    next >
Encoding:
Text File  |  1998-08-25  |  18.3 KB  |  423 lines  |  [TEXT/CWIE]

  1. ========================================================================
  2. Metrowerks Class Wrangler Read Me
  3. ========================================================================
  4.  
  5. Version: 1.4
  6. Date:    8-25-98
  7. by Greg Bolsinga, Peter Lewis, Tim Freehill
  8.  
  9. ========================================================================
  10. About Class Wrangler
  11. ========================================================================
  12.  
  13. Class Wrangler is a utility that allows you to view and alter the
  14. contents of an uncompressed .zip file or a .zip file compressed with
  15. the deflate algorithm. This algorithm is used by the zlib library and
  16. JAR files in JDK 1.1. It is not intended to be used as a general 
  17. purpose .zip tool because it only handles .zip files in a specific 
  18. format. This format is widely used, however.
  19.  
  20.  
  21. ========================================================================
  22. Drag and Drop
  23. ========================================================================
  24.  
  25. Dropping a folder onto the Class Wrangler application icon will have
  26. two possible effects:
  27.  
  28. 1) If a file is already open in Class Wrangler, the files within the
  29. folder hierarchy can optionally be added to the frontmost document,
  30.  
  31. or
  32.  
  33. 2) a new archive will be created containing all the files in the
  34. hierarchy.
  35.  
  36. Dropping a single file on Class Wrangler will have a similar effect. If
  37. there are duplicate files already in the open archive location, Class
  38. Wrangler will prompt you to overwrite the existing files.
  39.  
  40. Of course, dropping a file of type 'ZIP ' or 'ZIPf' on the application
  41. will open it.
  42.  
  43.  
  44. ========================================================================
  45. Archive Table
  46. ========================================================================
  47.  
  48. When a archive is opened using Class Wrangler, the contents thereof
  49. will be displayed in the table on the lower portion of the document's
  50. window. This table will list all the items in the archive, keeping the
  51. archive hierarchy intact. Showing the full path or only the item name
  52. can be set in the preferences. These paths are used when extracting the
  53. files, and are used by Java Virtual Machines that can read items
  54. directly from an archive.
  55.  
  56. When files are added to the archive, they are placed where they are
  57. dropped. This works similarly to dragging items the Finder's List view.
  58. However, .class and .java files are parsed to the the 'real' name. This
  59. will be placed into the correct hierarchy based upon their fully
  60. qualified name. This will also 'fix' files which had to have their
  61. names shortened for one reason or another.
  62.  
  63. The position of classes in the table reflects the namespace hierarchy of
  64. the classes in the zip file. This means that inner classes will be
  65. displayed as children of their outer class. These inner and outer
  66. classes are the same as 'regular' classes in all other respects.
  67.  
  68. The Manifest file, if present, isn't displayed in the table. The 
  69. manifest information is available in the archive window and the
  70. manifest window.
  71.  
  72. The user can set the bean state for a class item in the archive window.
  73. The column with the Java Bean at the top indicates if the item is a
  74. bean. A dot means that the item is a bean, otherwise it isn't. Click in
  75. the cell to toggle the bean state of the item.
  76.  
  77. The user can edit the manifest information for an item by selecting it
  78. in the archive window and choosing the Edit Manifest command in the 
  79. Package window. A new window will come up that will allow the user to
  80. change the editable manifest tags for the item. Any manifest tags that
  81. aren't recognized by Class Wrangler will be in the 'Other' pane. It
  82. is a plain editable text pane. You can edit the manifest tags here. By
  83. Sun's definition, manifest files are simply text files in the JAR file.
  84. As new tags are know, a UI should be added for them by the next release
  85. of Class Wrangler. The user can drag text to both of these panes.
  86.  
  87. You can type the name of an item to select it automatically. Typing
  88. tab will select the next visible item alphabetically, and shift-tab will
  89. select the previous visible item alphabetically. What you type ahead
  90. will be displayed at the top of the archive window.
  91.  
  92. Items that haven't yet been saved in the archive are drawn in italics.
  93. Items which didn't pass verification of the manifest file are drawn in
  94. the user preference color for Invalid Items.
  95.  
  96. Class Wrangler will always save archive files with a ".zip" or ".jar"
  97. extension.
  98.  
  99.  
  100. ========================================================================
  101. Save Manifest File
  102. ========================================================================
  103.  
  104. In the JAR specificaton, the manifest file is simply a text file. By 
  105. choosing this command in the File menu, the user can output the manifest
  106. file. It can be added to a java project that is building an archive
  107. file. The Java Linker will add the appropriate manifest data for the 
  108. named items in the output. The manifest file can only be saved from an
  109. archive that is saved itself.
  110.  
  111.  
  112. ========================================================================
  113. Import Manifest File
  114. ========================================================================
  115.  
  116. The user can import a manifest file into the active archive. This 
  117. command is in the Package menu. Any items in the archive that match a
  118. name in the imported manifest file will have it's manifest data changed
  119. to the imported data.
  120.  
  121.  
  122. ========================================================================
  123. Compressed State
  124. ========================================================================
  125.  
  126. After opening a document, the compressed icon is file in a compressed 
  127. state if the file is compressed, or a plain file if it is not
  128. compressed. A Compressed menu item in the Package menu also indicates
  129. the compressed state of the archive. Clicking on the icon or selecting
  130. the menu item toggles this state.
  131.  
  132.  
  133. ========================================================================
  134. Manifest State
  135. ========================================================================
  136.  
  137. After opening a document, the jar icon appears full if the file has
  138. manifest information, or appears empty if it has no manifest
  139. information. A Manifest menu item in the Package menu also indicates
  140. the manifest state of the archive. Clicking on the icon or selecting
  141. the menu item toggles this state.
  142.  
  143.  
  144. ========================================================================
  145. Add Files Button/Menu Item
  146. ========================================================================
  147.  
  148. Selecting this function allows you to add files to the frontmost open
  149. archive. When Add Files is chosen, you will be presented with the same
  150. style Add Files dialog the IDE uses. You can then select files to add. 
  151.  
  152. When Done is clicked on this dialog, these files will be added to the
  153. list of files already displayed in the archive.  If there are any
  154. duplicate files being added, you will be prompted before they are
  155. overwritten. Added files will be drawn in italics, denoting that they
  156. have not yet been saved to the disk. You MUST save the document before
  157. they are actually added to the file.
  158.  
  159. These files are added to the root of the archive, unless they are files
  160. which define their own hierarchy (such as .class or .java files).
  161.  
  162.  
  163. ========================================================================
  164. Extract Files Button/Menu Item
  165. ========================================================================
  166.  
  167. Selecting this function allows you to extract the selected file(s) from
  168. the frontmost open archive.
  169.  
  170. The extracted files will be put into a folder of the same name as the 
  171. project at the selected destination position. A folder hierarchy
  172. reflected that shown in the archive will also be created. For example,
  173. if you extract java/awt/Graphics.class from classes.zip, it will be put
  174. in the folder :java:awt: at the location you've chose. If the folder
  175. hierarchy already exists at that location, you will be prompted to
  176. overwrite the existing files.
  177.  
  178. Files are extracted using the file mappings set by Internet Config.
  179.  
  180.  
  181. ========================================================================
  182. Delete Files Button/Menu Item
  183. ========================================================================
  184.  
  185. Selecting this function allows you to delete the selected file(s) from
  186. the frontmost open archive.
  187.  
  188. When this function is selected, the highlighted items will be removed
  189. from the window's list. When the resulting archive is saved, only those
  190. items shown in the list will be saved in the resulting archive. Note
  191. that the deleted files are not actually removed from the archive on
  192. disk until the archive is saved.
  193.  
  194.  
  195. ========================================================================
  196. Add Directory Menu Item
  197. ========================================================================
  198.  
  199. The user can add a directory to the active archive by selecting the Add
  200. Directory command from the Package menu. In the resulting dialog box,
  201. enter the full pathname of the directory to be added. If an item is 
  202. selected in the archive window, it's full pathname will already be in
  203. the window, to allow the user to easily edit it. Please note that 
  204. directories must be separated by '/'.
  205.  
  206.  
  207. ========================================================================
  208. Information Button/Get Info Menu Item
  209. ========================================================================
  210.  
  211. Selecting this function allows you to see pertinent information about
  212. the selected .class file(s) from the frontmost open archive.
  213.  
  214. When this function is selected, the highlighted .class file will be 
  215. disassembled. A new window will be opened which gives the class's full
  216. package name, its size, its super class name, its source file name, the
  217. interfaces it implements, the fields in the class (both type and name),
  218. and the methods in the class (including access information, return type,
  219. its name, and parameter types).
  220.  
  221. The information windows are associated with the archive where the
  222. information was gathered from. If the associated archive is closed, all
  223. of its information windows will also be closed.
  224.  
  225. You can copy the signature used by java for a selected method by holding
  226. down the option key while copying. The java signature is very useful
  227. when writing java native methods.
  228.  
  229.  
  230. ========================================================================
  231. Edit Manifest Menu Item
  232. ========================================================================
  233.  
  234. Selecting this command allows the user to edit the manifest data for the
  235. currently selected item in the active archive.
  236.  
  237. The manifest data is displayed for the user to verify and modify.
  238. Certain items, like the name and MD5 & SHA hash codes, cannot be
  239. modified. The java bean state and the design time only state have 
  240. checkboxes to indicate whether or not they are on. The depends list is a
  241. list of items. Any text can be dragged to this pane in order to add it
  242. to the list. The other edit field holds all manifest tags that are not
  243. yet specifically parsed by Class Wrangler. These could include new tags
  244. from Sun or special user-defined tags. Since Manifest files are only
  245. text files, this provides a rough, but completely extensionable way to
  246. edit manifest tags.
  247.  
  248. Please see Sun's docs for the complete explanation of manfiest tag and
  249. manifest file format. In a nutshell, there is a specific format for the
  250. tags: <name>: <value>. Tags must be delimited with "\r\n" line breaks.
  251. Class Wrangler assures that this is the case in the 'other' pane.
  252.  
  253.  
  254. ========================================================================
  255. Find Main Classes Menu Item
  256. ========================================================================
  257.  
  258. Selecting this menu item in the Package Menu will draw all java classes
  259. that contain methods in the user preferred color. This will be useful
  260. in JDK 1.2, which has .jax files.
  261.  
  262.  
  263. ========================================================================
  264. Disassemble Class Menu Item
  265. ========================================================================
  266.  
  267. Selecting this menu item in the Package Menu will display the
  268. disassembly for the selected java class files. The disassembly is
  269. savable, but not editable. It's the same disassembly code as used in the
  270. IDE.
  271.  
  272.  
  273. ========================================================================
  274. View Menu Item
  275. ========================================================================
  276.  
  277. Selecting this menu itme in the Package Menu will display the currently
  278. selected text files in separate text windows. The text is savable, but
  279. not editable. Class Wrangler determines if a selected item in the
  280. archive is a text file by using Internet Config to map the item's
  281. extension to a MacOS file type.
  282.  
  283.  
  284. ========================================================================
  285. Using the Clipboard
  286. ========================================================================
  287.  
  288. Items can be manipulated in Class Wrangler with the clipboard. The text
  289. of the selected items is also copied to the clipboard.
  290.  
  291.  
  292. ========================================================================
  293. Using Drag and Drop
  294. ========================================================================
  295.  
  296. Items can be dragged between Class Wrangler windows. These behave as if 
  297. items had be extracted from one archive and added to the new one. The
  298. items are added to the location highlighted in the hierarchy. The text
  299. of the selected items is also dragged about.
  300.  
  301. Items can also be dragged to a Class Wrangler window from the Finder
  302. and to the Finder. When dragging to a window, Class Wrangler will add
  303. the files to the location highlighted in the hierarchy. When dragging to
  304. the Finder from a Class Wrangler window, Class Wrangler behaves as if
  305. the files were extracted to the destination folder. Class Wrangler
  306. accepts any type of file or folder dragged to the document window.
  307. Class Wrangler will iterate through all files and into all folders 
  308. in a dragged folder. If you don't want to create the folder hierarchy
  309. for the dragged out items in the Finder, option drag the item. It will
  310. place it exactly where you drop it.
  311.  
  312. However, when dragging .java or .class files to an archive window, they
  313. will ignore the drop location, and be placed at their correct fully
  314. qualified name position. This is obtained by parsing the file for
  315. this information.
  316.  
  317. Note: You can affect the text copied or dragged in Class Wrangler with
  318. the option key. When it is pressed while copying or dragging, it
  319. imports the text as a valid Java import statement which can then be
  320. placed directly into Java source files. If not, it simply copies the
  321. full path name of the selected files.
  322.  
  323. The user can drag text to the Manifest Editing Window's 'Depends' and
  324. 'Other' panes. A useful operation is to drag items from the archive
  325. window to the 'Depends' pane. Now the item referenced from the
  326. Manifest Editing window depends on that item in the archive.
  327.  
  328.  
  329. ========================================================================
  330. Comparing Archives
  331. ========================================================================
  332.  
  333. Class Wrangler can compare archive files. This way the user can
  334. determine what has changed from one archive file to another. To Compare
  335. archive files, select the "Compare Archive Files..." item from the File
  336. menu.
  337.  
  338. A dialog box similar to the IDE's Compare Files dialog box comes up.
  339. Click on the choose button to select archive files to compare. Files can
  340. also be dragged and dropped to the area where the file's path name is
  341. displayed.
  342.  
  343. There's a checkbox which selects whether the compare should be on item's
  344. contents or not. If it isn't checked, only the item names are compared,
  345. and the results will indicate which items are unique in each archive. If
  346. the checkbox is checked, the item names and the contents of items with
  347. the same name are compared. The results will indicates which items are
  348. unique and which items are different.
  349.  
  350. The compared archives are displayed in regular Class Wrangler archive
  351. documents. However, unique items are drawn in the user preference Unique
  352. Items color, and different items are drawn in the user preference 
  353. Different Items color.
  354.  
  355.  
  356. ========================================================================
  357. Preferences
  358. ========================================================================
  359.  
  360. There is a preference setting to turn off the default of asking for a
  361. file to open when Class Wrangler is started without opening a document.
  362.  
  363. There is a setting to toggle whether the full path name of the .class 
  364. should be displayed. If not, only the directory names and .class names
  365. are displayed. For example, java/awt/Graphics.class with full path
  366. names would be displayed:
  367.  
  368.     java/
  369.         java/awt/
  370.             java/awt/Graphics.class
  371.         
  372. With full path names off:
  373.  
  374.     java
  375.         awt
  376.             Graphics.class
  377.             
  378. There is a setting to toggle whether packages should be open in
  379. collapsed mode or not. When opening in collapsed mode, only the top
  380. level packages/classes will be seen. They can be opened in the regular
  381. fashion. When not opening in collapsed mode, every package will be
  382. completely shown.
  383.  
  384. The user can set whether the manifest file (if present) is verified
  385. when opening an archive. Invalid items in the archive are drawn in
  386. the user preference color for Invalid Items.
  387.  
  388. There is a preference to choose how a filename should be truncated on
  389. the Macintosh if the filename is too long. You can select the start,
  390. middle or the end. The file's extension is preserved in the truncation
  391. as well. Also, if an item's filename is shortened, the full java name
  392. for the item will be entered into the item's Finder Info comments.
  393.  
  394. There is a preference to choose the delay for the type ahead feature.
  395. One second (60 ticks) is the default value. There is also a preference
  396. to use the full package name for the type ahead. For example, if you'd
  397. like to select "java.util", this preference on would require you to
  398. type "java/util" instead of simply "util". Please note the "/" instead
  399. of the ".".
  400.  
  401. The user can set the color for special display items in the archive
  402. table. The color can be selected for Invalid Items, Unique Items, 
  403. Different Items, and the Main Classes. The respective defaults are red,
  404. green, blue, & purple.
  405.  
  406.  
  407. ========================================================================
  408. Contacting Metrowerks
  409. ========================================================================
  410.  
  411. For bug reports, technical questions, and suggestions, please use the
  412. forms in the Release Notes folder on the CD, and send them to
  413.  
  414. support@metrowerks.com
  415.  
  416. See the CodeWarrior on the Nets document in the Release Notes folder for
  417. more contact information, including a list of Internet newsgroups, 
  418. online services, and patch and update sites.
  419.  
  420. ========================================================================
  421. Greg Bolsinga
  422. Metrowerks Corporation
  423.